package com.hongyuan.venue.ui.home.beans;


import com.hongyuan.venue.utils.TimeUtil;

import java.util.List;

public class GroupClassBean {

    private List<ListBean> list;

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean {
        /**
         * os_name : 首玺健身金色水岸店
         * cs_id : 3000
         * os_id : 26
         * cs_start_time : 1617440760
         * cs_end_time : 1617444360
         * cs_name : 肚皮舞-蜜蜜
         * add_time : 1585904812
         * si_name : 瑜伽房
         * cs_state : 1
         * cs_max_num : 25
         * cs_min_num : 5
         * cs_img : http://hongyuangood.oss-cn-hangzhou.aliyuncs.com/uplaod/image/20190930/0b3621a7ad5fd9484de4d18e5e6d50562a7cf24c_686x472.jpg
         * bm_time : 1617436800
         * state_name : 报名中
         * to_state : 1
         * is_remind : 0
         * cs_sign_up_num : 0
         * add_date : 2020-04-03 17:06:52
         * cs_start_date : 2021-04-03 17:06:00
         * cs_end_date : 2021-04-03 18:06:00
         */

        private String os_name;
        private int cs_id;
        private int os_id;
        private long cs_start_time;
        private long cs_end_time;
        private String cs_name;
        private int add_time;
        private String si_name;
        private int cs_state;
        private int cs_max_num;
        private int cs_min_num;
        private String cs_img;
        private long bm_time;
        private String state_name;
        private String to_state;
        private String is_remind;
        private int cs_sign_up_num;
        private String add_date;
        private String cs_start_date;
        private String cs_end_date;

        public String getOs_name() {
            return os_name;
        }

        public void setOs_name(String os_name) {
            this.os_name = os_name;
        }

        public int getCs_id() {
            return cs_id;
        }

        public void setCs_id(int cs_id) {
            this.cs_id = cs_id;
        }

        public int getOs_id() {
            return os_id;
        }

        public void setOs_id(int os_id) {
            this.os_id = os_id;
        }

        public long getCs_start_time() {
            return cs_start_time;
        }

        public void setCs_start_time(long cs_start_time) {
            this.cs_start_time = cs_start_time;
        }

        public long getCs_end_time() {
            return cs_end_time;
        }

        public void setCs_end_time(long cs_end_time) {
            this.cs_end_time = cs_end_time;
        }

        public String getCs_name() {
            return cs_name;
        }

        public void setCs_name(String cs_name) {
            this.cs_name = cs_name;
        }

        public int getAdd_time() {
            return add_time;
        }

        public void setAdd_time(int add_time) {
            this.add_time = add_time;
        }

        public String getSi_name() {
            return si_name;
        }

        public void setSi_name(String si_name) {
            this.si_name = si_name;
        }

        public int getCs_state() {
            return cs_state;
        }

        public void setCs_state(int cs_state) {
            this.cs_state = cs_state;
        }

        public int getCs_max_num() {
            return cs_max_num;
        }

        public void setCs_max_num(int cs_max_num) {
            this.cs_max_num = cs_max_num;
        }

        public int getCs_min_num() {
            return cs_min_num;
        }

        public void setCs_min_num(int cs_min_num) {
            this.cs_min_num = cs_min_num;
        }

        public String getCs_img() {
            return cs_img;
        }

        public void setCs_img(String cs_img) {
            this.cs_img = cs_img;
        }

        public long getBm_time() {
            return bm_time;
        }

        public void setBm_time(long bm_time) {
            this.bm_time = bm_time;
        }

        public String getState_name() {
            return state_name;
        }

        public void setState_name(String state_name) {
            this.state_name = state_name;
        }

        public String getTo_state() {
            return to_state;
        }

        public void setTo_state(String to_state) {
            this.to_state = to_state;
        }

        public String getIs_remind() {
            return is_remind;
        }

        public void setIs_remind(String is_remind) {
            this.is_remind = is_remind;
        }

        public int getCs_sign_up_num() {
            return cs_sign_up_num;
        }

        public void setCs_sign_up_num(int cs_sign_up_num) {
            this.cs_sign_up_num = cs_sign_up_num;
        }

        public String getAdd_date() {
            return add_date;
        }

        public void setAdd_date(String add_date) {
            this.add_date = add_date;
        }

        public String getCs_start_date() {
            return cs_start_date;
        }

        public void setCs_start_date(String cs_start_date) {
            this.cs_start_date = cs_start_date;
        }

        public String getCs_end_date() {
            return cs_end_date;
        }

        public void setCs_end_date(String cs_end_date) {
            this.cs_end_date = cs_end_date;
        }

        /*
         * 获取显示时间
         * */
        public String showTimeText(){
            String showTime = TimeUtil.formatDate(cs_start_date,TimeUtil.dateFormat,TimeUtil.dateFormatMDofChinese);
            showTime+=" "+TimeUtil.formatDate(cs_start_date,TimeUtil.dateFormat,TimeUtil.dateFormatHM);
            showTime+="-"+TimeUtil.formatDate(cs_end_date,TimeUtil.dateFormat,TimeUtil.dateFormatHM);
            return showTime;
        }

        public String storeName(){
            return os_name + " / " + si_name;
        }

        public String haveNum(){
            return cs_sign_up_num+"/"+cs_max_num;
        }

        public String haveStrNum(){
            return "已报名 "+cs_sign_up_num+"/"+cs_max_num;
        }

        /*
        * 状态字符串显示
        * */
        public String getMyState_name(){
            String showName;

            if("1".equals(to_state)){
                showName = "可预约";
            }else if("2".equals(to_state)){
                showName = "紧张";
            }else if("3".equals(to_state)){
                showName = "已满";
            }else if("4".equals(to_state)){
                showName = "已预约";
            }else{
                showName = "未开放";
            }

            if(System.currentTimeMillis() < bm_time*1000){
                showName = "未开放";
            }

            return showName;
        }
    }
}
